package com.ruoyi.voit.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 支付交易记录对象 payment_record
 * 
 * @author ruoyi
 * @date 2025-07-17
 */
public class PaymentRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 支付记录ID */
    private String paymentId;

    /** 关联用户ID */
    @Excel(name = "关联用户ID")
    private String userId;

    /** 关联订单ID */
    @Excel(name = "关联订单ID")
    private String orderId;

    /** 实际支付金额（单位：元） */
    @Excel(name = "实际支付金额", readConverterExp = "单=位：元")
    private BigDecimal amount;

    /** 支付方式 */
    @Excel(name = "支付方式")
    private String method;

    /** 第三方支付平台交易号 */
    @Excel(name = "第三方支付平台交易号")
    private String transactionId;

    /** 支付完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /** 记录创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    public void setPaymentId(String paymentId) 
    {
        this.paymentId = paymentId;
    }

    public String getPaymentId() 
    {
        return paymentId;
    }

    public void setUserId(String userId) 
    {
        this.userId = userId;
    }

    public String getUserId() 
    {
        return userId;
    }

    public void setOrderId(String orderId) 
    {
        this.orderId = orderId;
    }

    public String getOrderId() 
    {
        return orderId;
    }

    public void setAmount(BigDecimal amount) 
    {
        this.amount = amount;
    }

    public BigDecimal getAmount() 
    {
        return amount;
    }

    public void setMethod(String method) 
    {
        this.method = method;
    }

    public String getMethod() 
    {
        return method;
    }

    public void setTransactionId(String transactionId) 
    {
        this.transactionId = transactionId;
    }

    public String getTransactionId() 
    {
        return transactionId;
    }

    public void setPayTime(Date payTime) 
    {
        this.payTime = payTime;
    }

    public Date getPayTime() 
    {
        return payTime;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("paymentId", getPaymentId())
            .append("userId", getUserId())
            .append("orderId", getOrderId())
            .append("amount", getAmount())
            .append("method", getMethod())
            .append("transactionId", getTransactionId())
            .append("payTime", getPayTime())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
